<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../css/bootstrap.min.css" />
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/DatePicker.js"></script>
<script src="../laydate/laydate.js"></script>

<title>商品添加页面</title>

	<style>
		body{padding: 10px;}
		.demo-input{padding-left: 10px; height: 38px; min-width: 262px; line-height: 38px; border: 1px solid #e6e6e6;  background-color: #fff;  border-radius: 2px;}
		/*.demo-footer{padding: 50px 0; color: #999; font-size: 14px;}*/
		/*.demo-footer a{padding: 0 5px; color: #01AAED;}*/
	</style>

	<script>
		//执行一个laydate实例
		laydate.render({
			elem: '#test5'
			,type: 'datetime'
		});
	</script>
</head>
<body>
	<div class="row" style="margin-left: 20px;">
		<form action="/admin?method=addProduct" method="post" enctype="multipart/form-data">
			<div>
				<h3>新增商品</h3>
			</div>
			<hr />
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group form-inline">
						<label>名称:</label>
						<input type="text" name="pName" class="form-control" />
					</div>
					
					<div class="form-group form-inline">
						<label>分类:</label>
						<select name="tId" class="form-control">
							<option value="0">------</option>
							<c:forEach items="${goodsTypeList}" var="product">
								<option value="${product.tId}">${product.tName}</option>
							</c:forEach>
						</select>
					</div>
					<div class="form-group form-inline">
						<label>价格:</label>
						<input type="text" name="pPrice" class="form-control" />
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group form-inline">
						<label>时间:</label>
						<input type="text" name="pTime" readonly="readonly" placeholder="请选择日期" class="demo-input" id="test5" />
						<%--						onclick="setday(this)--%>
						<%--						form-control--%>
						<%--						readonly="readonly"--%>
					</div>
					<div class="form-group form-inline">
						<label>评分:</label>
						<input type="text" name="pState" class="form-control" />
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-10">
					<div class="form-group form-inline">
						<label>商品图片</label>
						<input type="file" name="pImage" />
					</div>
					<div class="form-group ">
						<label>商品简介</label>
						<textarea  name="pINfo" class="form-control" rows="5"></textarea>
					</div>
					<div class="form-group form-inline">
						<input type="submit" value="添加" class="btn btn-primary" />
						<input type="reset" value="重置" class="btn btn-default" />
					</div>
				</div>
			</div>
		</form>
	</div>
</body>
</html>